<% form_for :currentsession, @currentsession, :html => { :id => "sessionform" } do |f| %>
<%= f.hidden_field(:id) %>
<table cellpadding="0" cellspacing="0">
	<tr>
		<td>Date</td>
		<td><%= calendar_date_select(:currentsession, :workoutdate) %><!--<br/><%= f.date_select(:workoutdate) %>--></td>
	</tr>
	<tr>
		<td>Type</td>
		<td><%= collection_select(:currentsession, :cardiotype_id, @cardiotypes, "id", "description") %></td>
	</tr>
	<tr>
		<td>Distance</td>
		<td><%= f.text_field(:distance) %></td>
	</tr>
	<tr>
		<td>Time Taken</td>
		<td><%= f.text_field(:timetakenastext) %></td>
	</tr>
	<tr valign="top">
		<td>Comments</td>
		<td><%= f.text_area(:comments) %></td>
	</tr>
</table>
<%= content_tag('div', render(:partial => "sessionErrors") ) if !@currentsession.errors.nil? %>
<p>
	<a class='action' href='#' onclick="$('sessionform').submit()"><span>Save</span></a>
	<a class='action' href='<%= @back %>' style="margin-left: 0.5em"><span>Back</span></a>
</p>
<% end -%>
